<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Title</title>
</head>
<body>

</body>
<script>
	// (function(){
	// 	var a = 1;
	// 	console.log(a);
	// })();
	
	// {
	// 	let a = 1;
	// 	console.log(a);
	// }
	//
	
	// const obj = {
	//
	// }
	// obj.a = 1;
	
	let wangfei = {
		name: '王菲',
		age: 18,
		songs: ['红豆', '流年', '暧昧', '传奇'],
		history: [
			{name: '窦唯'},
			{name: '李亚鹏'},
			{name: '谢霆锋'}
		]
	};
	const {name:userName,age,songs:[one,two,three,four],history:[{name},{name:name2},{name:name3}]} = wangfei;
	console.log(userName,age,one,two,three,four,name,name2,name3);// 王菲 18 红豆 流年 暧昧 传奇 窦唯 李亚鹏 谢霆锋
	
</script>
</html>